package com.taxi.service;

import java.util.ArrayList;
import java.util.List;

import com.taxi.bean.VehiculoBean;
import com.taxi.daos.factory.DAOFactory;
import com.taxi.daos.interfaces.VehiculoDAO;

public class VehiculoServiceImpl implements VehiculoService {

	DAOFactory daoFactory=DAOFactory.getDAOFactory(DAOFactory.MYSQL);
	VehiculoDAO vehiculoDAO=daoFactory.getVehiculoDAO();
		
	public void  registrarVehiculo(VehiculoBean bean) throws Exception {
		 vehiculoDAO.registrarVehiculo(bean);
	}

	public VehiculoBean codigoAutogenerado()throws Exception {
		// TODO Auto-generated method stub
		return vehiculoDAO.codigoAutogenerado();
	}
	
	public void  actualizarVehiculo(VehiculoBean bean) throws Exception {
		 vehiculoDAO.actualizarVehiculo(bean) ;
	}
	
	public void  eliminarVehiculo(VehiculoBean bean) throws Exception {
		 vehiculoDAO.eliminarVehiculo(bean) ; 
	}
	
	public List<VehiculoBean>  listadoVehiculo() throws Exception {
		 return vehiculoDAO.listadoVehiculo() ; 
	}
	

	 
	public ArrayList<VehiculoBean> listaVehiculo() throws Exception {
		// TODO Auto-generated method stub
		return vehiculoDAO.listaVehiculo();
	}

	 
	public VehiculoBean listarxrucVehiculo(String ruc) throws Exception {
		// TODO Auto-generated method stub
		return vehiculoDAO.listarxrucVehiculo(ruc);
	}

	 
	public List<VehiculoBean> listarVehiculosPorEmpresa(int id)
			throws Exception {
		// TODO Auto-generated method stub
		return vehiculoDAO.listarVehiculosPorEmpresa(id);
	}

}
